/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exatrez.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "severity_code")
@NamedQueries({
    @NamedQuery(name = "SeverityCode.findAll", query = "SELECT s FROM SeverityCode s")})
public class SeverityCode implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "severity_code_id")
    private Integer severityCodeId;
    @Column(name = "severity_name")
    private String severityName;
    @Column(name = "severity_color")
    private String severityColor;    
    @Column(name = "severity_day")
    private Integer severityDay;
    @Embedded
    private InfoAudit infoAudit;

    public SeverityCode() {
    }

    public SeverityCode(Integer severityCodeId) {
        this.severityCodeId = severityCodeId;
    }

    public Integer getSeverityCodeId() {
        return severityCodeId;
    }

    public void setSeverityCodeId(Integer severityCodeId) {
        this.severityCodeId = severityCodeId;
    }

    public String getSeverityName() {
        return severityName;
    }

    public void setSeverityName(String severityName) {
        this.severityName = severityName;
    }

    public Integer getSeverityDay() {
        return severityDay;
    }

    public void setSeverityDay(Integer severityDay) {
        this.severityDay = severityDay;
    }

    public InfoAudit getInfoAudit() {
        return infoAudit;
    }

    public void setInfoAudit(InfoAudit infoAudit) {
        this.infoAudit = infoAudit;
    }

    public String getSeverityColor() {
        return severityColor;
    }

    public void setSeverityColor(String severityColor) {
        this.severityColor = severityColor;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (severityCodeId != null ? severityCodeId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SeverityCode)) {
            return false;
        }
        SeverityCode other = (SeverityCode) object;
        if ((this.severityCodeId == null && other.severityCodeId != null) || (this.severityCodeId != null && !this.severityCodeId.equals(other.severityCodeId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "exatrez.model.SeverityCode[ severityCodeId=" + severityCodeId + " ]";
    }
}
